#include "Seq.h"



Seq::Seq()
{
}


Seq::~Seq()
{
}

void Seq::gen(Label * begin, Label * next)
{
	Stmt::gen(begin, next);
	if (!this->stmt)
		this->next->gen(begin, next);
	else if (!this->next)
		this->stmt->gen(begin, next);
	else
	{
		Label* mid = new Label();
		this->stmt->gen(begin, mid);
		RTL::putLabel(mid);
		this->next->gen(mid, next);
	}
}
